﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../styles/js-console.css" rel="stylesheet" />
</head>
<body>
    <div id="js-console"></div>
    <script src="../scripts/js-console.js"></script>
    <script>
        var array = [5, 9, 6, 3, 0, 1, 7, 2, 4, 8];


        for (var i = 0; i < array.length; i++) {
            for (var j = i+1; j < array.length; j++) {
                if (array[j] < array[i]) {
                    var tempVariable = array[i];
                    array[i] = array[j];
                    array[j] = tempVariable;
                }
            }
        }

        for (var i = 0; i < array.length; i++) {
            jsConsole.write(array[i] + ' ');
        }
    </script>
</body>
</html>
